package com.qb.common.net.one

import com.qb.common.bean.JokeBean


class ApiRepository private constructor(private val netWork: NetWork){

    companion object {

        @Volatile
        private var INSTANCE: ApiRepository? = null

        fun getInstance(netWork: NetWork) = INSTANCE ?: synchronized(this) {
            INSTANCE ?: ApiRepository(netWork).also { INSTANCE = it }
        }
    }

    suspend fun phoneQuery(map:MutableMap<String,Any>): JokeBean {
        return netWork.phoneQuery(map)
    }
}